home *** CD-ROM | disk | FTP | other *** search
/ Best of www.BestZips.com (Collector's Edition) / Best of WWW.BESTZIPS.COM Collector's Edition (JCSM Shareware) (JCS Marketing).ISO / prgtools / enigma31.zip / samples.zi_ / samples.zi / Level1.frm next >
Text File  |  1996-09-02  |  4KB  |  188 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Level One "
  4.    ClientHeight    =   2685
  5.    ClientLeft      =   3645
  6.    ClientTop       =   2730
  7.    ClientWidth     =   3645
  8.    Height          =   3090
  9.    Left            =   3585
  10.    LinkTopic       =   "Form1"
  11.    LockControls    =   -1  'True
  12.    ScaleHeight     =   2685
  13.    ScaleWidth      =   3645
  14.    Top             =   2385
  15.    Width           =   3765
  16.    Begin VB.CommandButton Command3 
  17.       Caption         =   "E&xit"
  18.       Height          =   405
  19.       Left            =   2490
  20.       TabIndex        =   4
  21.       Top             =   2190
  22.       Width           =   1065
  23.    End
  24.    Begin VB.CommandButton Command2 
  25.       Caption         =   "&Continue"
  26.       Height          =   405
  27.       Left            =   1290
  28.       TabIndex        =   3
  29.       Top             =   2190
  30.       Width           =   1065
  31.    End
  32.    Begin VB.CommandButton Command1 
  33.       Caption         =   "&Register"
  34.       Enabled         =   0   'False
  35.       Height          =   405
  36.       Left            =   120
  37.       TabIndex        =   2
  38.       Top             =   2190
  39.       Width           =   1065
  40.    End
  41.    Begin VB.TextBox Text2 
  42.       Height          =   315
  43.       Left            =   120
  44.       MultiLine       =   -1  'True
  45.       TabIndex        =   1
  46.       Top             =   1770
  47.       Width           =   3405
  48.    End
  49.    Begin VB.TextBox Text1 
  50.       Height          =   1575
  51.       Left            =   120
  52.       MultiLine       =   -1  'True
  53.       TabIndex        =   0
  54.       Top             =   90
  55.       Width           =   3405
  56.    End
  57. End
  58. Attribute VB_Name = "Form1"
  59. Attribute VB_Creatable = False
  60. Attribute VB_Exposed = False
  61. Option Explicit
  62.  
  63. Private Sub Command1_Click()
  64.  
  65. Dim stext1 As String
  66. Dim stext2 As Variant
  67.  
  68. stext1 = Text1.Text
  69. stext2 = Text2.Text
  70.  
  71.     If Jumbler(stext1, stext2) = False Then
  72.     
  73.         MsgBox "Registration Information Is Invalid", 48, "Shareware"
  74.     
  75.         Text1.Text = ""
  76.         Text2.Text = ""
  77.         Text1.SetFocus
  78.         
  79.     Else
  80.     
  81.         MsgBox "Thank You, Registration Accepted", , "Shareware"
  82.         
  83.             WriteIt stext1, stext2
  84.             benable = True
  85.             Unload Me
  86.             
  87.             Form2.Show
  88.         
  89.     End If
  90.  
  91. End Sub
  92.  
  93. Private Sub Command2_Click()
  94.         
  95.         Unload Me
  96.         Form2.Caption = Form1.Caption
  97.         Form2.Show
  98.         
  99. End Sub
  100.  
  101. Private Sub Command3_Click()
  102.         
  103.         End
  104.         
  105. End Sub
  106.  
  107. Private Sub Form_Load()
  108.         
  109.         Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2
  110.        
  111.        
  112. End Sub
  113.  
  114. Private Sub Text1_Change()
  115.         
  116.         EnableButtons
  117.         
  118. End Sub
  119.  
  120. Private Sub Text1_KeyPress(KeyAscii As Integer)
  121.         
  122.         If KeyAscii = 13 Then
  123.         
  124.             Text2.SetFocus
  125.             
  126.         End If
  127.         
  128. End Sub
  129.  
  130. Private Sub Text2_Change()
  131.         
  132.         EnableButtons
  133.         
  134. End Sub
  135.  
  136. Private Sub EnableButtons()
  137.  
  138.     If Text1.Text > "" And Text2.Text > "" Then
  139.     
  140.         Command1.Enabled = True
  141.         
  142.     Else
  143.     
  144.         Command1.Enabled = False
  145.         
  146.     End If
  147.     
  148. End Sub
  149.  
  150. Private Sub Text3_Change()
  151.         
  152.         Dim LenText As Integer
  153.         
  154.            LenText = Len(Text3.Text)
  155.            
  156.            If LenText = 2 Then
  157.             
  158.                 If Kickout(Text3.Text) = False Then
  159.                 
  160.                     Text3.Text = ""
  161.                     Text3.SetFocus
  162.                     
  163.                 Else
  164.                 
  165.                     Text2.SetFocus
  166.                     
  167.                 End If
  168.                 End If
  169. End Sub
  170.  
  171. Private Sub Text3_GotFocus()
  172. If Text1.Text = "" Then
  173.  
  174.     Text1.SetFocus
  175.     
  176. End If
  177.  
  178. End Sub
  179.  
  180. Private Sub Text2_KeyPress(KeyAscii As Integer)
  181.         
  182.         If KeyAscii = 13 Then
  183.             
  184.             Command1_Click
  185.             
  186.         End If
  187. End Sub
  188.